/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmConnectwaterjob extends BasicModel<PmConnectwaterjob> {
  createDate?: string; // 创建时间
  name?: string; // 接水类别
  projectno?: string; // 工程编码
  projectname?: string; // 工程名称
  oano?: string; // oano
  oapic?: string; // oapic
  sponsor?: string; // 发起人
  sponsordate?: string; // 接水完成
  connectwatertime?: string; // 停水时间
  ffile?: string; // ffile
  connectwaterresult?: string; // 接水结果
  connectwaterpic?: string; // connectwaterpic
  administrativearea?: string; // 行政区域
  pipesize?: number; // 接水管道口径
  valveposition?: string; // 阀门位置
  cutoffarea?: string; // 停水工作位置
  population?: string; // 影响户数
  keyunit?: string; // 重点单位
  wdischargetime?: string; // 排水时长(小时)
  wsupplytime?: string; // 冲洗时长(小时)
  constructiontime?: string; // 施工时间(小时)
  wdischargeoano?: string; // OA表单ID
  wdischargeoapic?: string; // wdischargeoapic
  wastepipefile?: string; // wastepipefile
  wastepipe?: number; // wastepipe
  gwwastepipefile?: string; // gwwastepipefile
  frontpressurearea?: string; // 停水范围
  startimg?: string; // startimg
  worktime?: string; // worktime
  pipeinvolved?: string; // pipeinvolved
  scenepic?: string; // 接水现场图片
  duration?: string; // duration
  diameter?: string; // 管道直径(毫米)
  remarks?: string; // 备注信息
}

export const pmConnectwaterjobList = (params?: PmConnectwaterjob | any) =>
  defHttp.get<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/list',
    params,
  });

export const pmConnectwaterjobListData = (params?: PmConnectwaterjob | any) =>
  defHttp.post<Page<PmConnectwaterjob>>({
    url: adminPath + '/process/job/pmConnectwaterjob/listData',
    params,
  });

export const pmConnectwaterjobForm = (params?: PmConnectwaterjob | any) =>
  defHttp.get<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/form',
    params,
  });

export const pmConnectwaterjobSave = (params?: any, data?: PmConnectwaterjob | any) =>
  defHttp.postJson<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/save',
    params,
    data,
  });

export const pmConnectwaterjobDelete = (params?: PmConnectwaterjob | any) =>
  defHttp.get<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/delete',
    params,
  });

export const pmConnectwaterjobmoreSave = (params?: any, data?: PmConnectwaterjob | any) =>
  defHttp.postJson<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/moreSave',
    params,
    data,
  });

export const pmConnectwaterjoboaSave = (params?: any, data?: PmConnectwaterjob | any) =>
  defHttp.postJson<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/oaSave',
    params,
    data,
  });

export const pmConnectwaterjobresultSave = (params?: any, data?: PmConnectwaterjob | any) =>
  defHttp.postJson<PmConnectwaterjob>({
    url: adminPath + '/process/job/pmConnectwaterjob/resultSave',
    params,
    data,
  });

export const pmWatermeterOAProgressListData = (params?: PmConnectwaterjob | any) =>
  defHttp.post<Page<PmConnectwaterjob>>({
    url: adminPath + '/process/job/pmConnectwaterjob/oaProgress',
    params,
  });
